<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">

<head>
<title>博客管理登录</title>
<th:block th:replace="admin/_fragments :: somehead"></th:block>
</head>

<body>

	<nav th:replace="admin/_fragments :: backnav(1)"></nav>
	
	<br>
	
	<div class="ui container m-padded-tb-massive"style="max-width: 35em !important">
		<div class="ui container">
			<div class="ui middle aligned center aligned grid">
				<div class="column">
					<h2 class="ui teal image header">
						<!-- <img src="assets/images/logo.png" class="image"> -->
						<div class="content">账号登录</div>
					</h2>
					<form class="ui large form" method="post" action="#" th:action="@{/admin/login}">
						<div class="ui segment">
							<div class="field">
								<div class="ui left icon input">
									<i class="user icon"></i> <input type="text" name="username" placeholder="用户名">
								</div>
							</div>
							<div class="field">
								<div class="ui left icon input">
									<i class="lock icon"></i> <input type="password"
										name="password" placeholder="密码">
								</div>
							</div>
							<button class="ui fluid large teal submit button">登录</button>
						</div>

						<div class="ui error mini message"></div>
						<div class="ui mini negative message" th:unless="${#strings.isEmpty(message)}" th:text="${message}"></div>

					</form>

					<!-- <div class="ui message"></div> -->
				</div>
			</div>
		</div>
	</div>
	
	<br>
	<br>
	<br>
	<br>
	<br>
	<br>
	
	<footer th:replace="admin/_fragments :: footer" ></footer>
	
	<!-- 非空验证 -->
	<script>
		$('.ui.form').form({
			fields : {
				username : {
					identifier: 'username',
					rules: [{
						type : 'empty',
						prompt: '用户名不能为空'
					}]
				},
				password : {
					identifier: 'password',
					rules: [{
						type : 'empty',
						prompt: '密码不能为空'
					}]
				}
			}
		})
	</script>
	
</body>

</html>